package com.lantosec.hmrp.modules.workflow.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.flowable.engine.history.HistoricActivityInstance;
import org.flowable.task.api.Task;

import java.util.Date;

/**
 * 流程实例的历史活动
 *
 * @author lichaowei
 * @date 2020/4/30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "流程实例的历史活动", description = "流程实例的历史活动")
public class HisActivityInstanceVO {

    public HisActivityInstanceVO(HistoricActivityInstance entity){
        id = entity.getId();
        processInstanceId = entity.getProcessInstanceId();
        taskId = entity.getTaskId();
        activityName = entity.getActivityName();
        assignee = entity.getAssignee();
        startTime = entity.getStartTime();
        endTime = entity.getEndTime();
    }

    @ApiModelProperty(value = "活动ID")
    private String id;

    @ApiModelProperty(value = "流程实例ID")
    private String processInstanceId;

    @ApiModelProperty(value = "流程任务Id")
    private String taskId;

    @ApiModelProperty(value = "活动名称")
    private String activityName;

    @ApiModelProperty(value = "办理人")
    private String assignee;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;
}
